﻿using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
using System.IO;
using System.Linq;
using Bystd.Geo.GeoParsers.Shpfile;
using Bystd.Geo.Geometries;

namespace Bystd.Geo.GeoParsers.Parser
{
    /// <summary>
    /// *.shp
    /// </summary>
    public class ShpParser
    {
        public GeoType GeometryType { get; private set; }

        public ShpParser()
        {

        }

        public ShpFile FromReader(string pathName)
        {
            using (GeometryReader reader = new GeometryReader(pathName))
            {
                GeometryType = reader.GeometryType;

                return reader.Reader();
            }
        }
    }
}
